import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

ApplicationWindow {
    visible: true
    width: 600
    height: 600
    title: "Image示例"

    ColumnLayout {
        anchors.fill: parent
        spacing: 10
        anchors.margins: 10

        // 示例选择区域
        RowLayout {
            Layout.fillWidth: true
            spacing: 10

            Button {
                text: "ImageScale"
                onClicked: loader.source = "ImageScale.qml"
            }
            Button {
                text: "ImageTransform"
                onClicked: loader.source = "ImageTransform.qml"
            }
            Button {
                text: "ImageRotation"
                onClicked: loader.source = "ImageRotation.qml"
            }
        }

        // 示例显示区域
        Rectangle {
            Layout.fillWidth: true
            Layout.fillHeight: true
            color: "#f0f0f0"
            border.color: "#cccccc"
            border.width: 1

            Loader {
                id: loader
                anchors.centerIn: parent
                source: "ImageScale.qml"  // 默认加载第一个示例
            }
        }

        // 说明文本
        Text {
            Layout.fillWidth: true
            text: "当前示例说明：\n" +
                  "示例1：缩放变换\n" +
                  "示例2：平移变换\n" +
                  "示例3：旋转变换\n"
            wrapMode: Text.Wrap
            color: "#666666"
        }
    }
}

